<template>
  <div class="main-header">
    <div class="menu-icon" @click="handlMenuIconClcik">
      <!-- <el-icon size="25px" v-if="isFold"><Fold /></el-icon>
      <el-icon size="25px" v-else><Expand /></el-icon> -->
      <el-icon size="25px"
        ><component :is="isFold ? 'Expand' : 'Fold'"
      /></el-icon>
    </div>
    <div class="content">
      <header-curmb></header-curmb>

     <!-- 个人信息 -->
      <header-info></header-info>
    </div>
  </div>
</template>

<script setup lang="ts">
import headerCurmb from "./c-cpns/header-curmb.vue"
import headerInfo from "./c-cpns/header-info.vue"
import { ref,defineEmits } from "vue"
const emit=defineEmits(['foldChange'])
const isFold = ref(false)

function handlMenuIconClcik() {
  isFold.value = !isFold.value
  // 内部
  emit("foldChange",isFold.value)
  console.log(11)
}
</script>
<style scoped lang="less">
.main-header {
  display: flex;
  align-items: center;
  flex: 1;
  height: 100%;

  .menu-icon {
    display: flex;
    align-items: center;
    cursor: pointer;
  }

  .content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex: 1;
    padding: 0 18px;
  }
}
</style>
